package com.longrise.android.by.activity;

import com.longrise.android.by.javascriptInterface.ClictMInterface;
import com.longrise.android.by.javascriptInterface.PlanConInterface;
import com.longrise.android.by.javascriptInterface.ProComInterface;
import com.longrise.android.by.javascriptInterface.XUCPInterface;
import com.longrise.android.by.utils.BYContants;

/**
 * Created by godliness on 2017/3/9.
 */

public class BYWebCallback {

    private BYWebCallback() {
    }

    /**
     * @param pageType 参数说明：
     *                 BYContants.CLIENT_MANAGER      客户管理
     *                 BYContants.XUQ_CEP             保易智评
     *                 BYContants.PRODUCT_TPYE        产品点评
     *                 BYContants.COMPANY_TYPE        公司点评
     *                 BYContants.TRYELIKE_TYPE       保险案件
     *                 BYContants.PLANCONSTART_TYPE   计划对比
     */
    public static Object getJavascriptInterface(int pageType, BYWebActivity act) {
        switch (pageType) {
            case BYContants.CLIENT_MANAGER:  //客户管理
                return new ClictMInterface(act);

            case BYContants.XUQ_CEP:  //需求测评
                return new XUCPInterface(act);

            case BYContants.COMPANY_TYPE:  //公司点评
            case BYContants.TRYELIKE_TYPE: //保险案件
            case BYContants.PRODUCT_TPYE:  //产品点评
                return new ProComInterface(act);

            case BYContants.PLANCONSTART_TYPE:
                return new PlanConInterface(act);

        }
        return null;
    }
}
